<div id="sidebar-left" class="sidebar">
<?php
    if(isset($_GET['action']) && isset($_SESSION['login']))
    {
        $mange_account='<li class="leaf"><a href="/formulaonekitchens/user/1">My account</a></li>';
        echo '<div id="block-user-1" class="clear-block block block-user">
        <h2>admin</h2>

        <div class="content">
            <ul class="menu">
                <li class="leaf first"><a href="index.php?action=mp&cate_id=1">Kitchen&#039;s Project</a></li>
                <li class="leaf"><a href="index.php?action=mp&cate_id=2">Bathroom&#039;s Project</a></li>
                <li class="leaf"><a href="index.php?action=mp&cate_id=3">Makeover&#039;s Project</a></li>
                
                <li class="leaf last"><a href="../action/control_login.php?action=logout">Log out</a></li>
             </ul>
        </div>
    </div>';
    }
    else{
        echo '<div class="clear-block block block-user" id="block-user-0">
        <h2>User login</h2>
        <div class="content">
            <form  method="post" accept-charset="UTF-8" action="../action/control_login.php?action=login">
                <div>
                    <div id="edit-name-wrapper" class="form-item">
                        <label for="edit-name">Username: <span title="This field is required." class="form-required">*</span></label>
                        <input type="text" class="form-text required" value="" size="15" id="txtUser" name="txtUser" maxlength="60">
                    </div>
                    <div id="edit-pass-wrapper" class="form-item">
                        <label for="edit-pass">Password: <span title="This field is required." class="form-required">*</span></label>
                        <input type="password" class="form-text required" size="15" maxlength="60" id="txtPass" name="txtPass">
                    </div>
                    <input type="submit" class="form-submit" value="Log in" id="edit-submit" name="op">
                   

                </div>
            </form>
        </div>
    </div>';
        
    }
?>
</div>